<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/templates/HeaderTopMenuTemplate.xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:define name="conteudo">
        <p:panel id="pnlCadastro" header="Cadastro">
            <h:panelGrid columns="3">
                <p:outputLabel for="txtMatricula" value="#{msg['label.matricula']}:" styleClass="negrito" />
                <p:inputText id="txtMatricula" label="#{msg['label.matricula']}" size="10" maxlength="100" value="#{emprestimoCadastroForm.matricula}" required="true" >
                    <f:convertNumber integerOnly="true"/>
                </p:inputText>
                <p:message for="txtMatricula"/>
                <p:outputLabel for="txtDtEmp" value="#{msg['label.data.reserva']}:" styleClass="negrito" />
                <p:calendar id="txtDtEmp" label="#{msg['label.data.reserva']}" value="#{emprestimoCadastroForm.dtEmprestimo}" pattern="dd/MM/yyyy" required="true"/>
                <p:message for="txtDtEmp" />
                <p:outputLabel for="txtDtDev" value="#{msg['label.data.devolucao']}:" styleClass="negrito" />
                <p:calendar id="txtDtDev" label="#{msg['label.data.devolucao']}" value="#{emprestimoCadastroForm.dtDevolucao}" pattern="dd/MM/yyyy" required="true" />
                <p:message for="txtDtDev" />
            </h:panelGrid>
            <h:panelGrid columns="2">
                <h:commandButton id="btnOK" value="OK" action="#{emprestimoCadastroForm.onBotaoOKClick}" />
                <h:commandButton id="btnCancelar" value="Cancelar" immediate="true" action="/livroConsultaForm.xhtml?faces-redirect=true"/>
            </h:panelGrid>
        </p:panel>
    </ui:define>

</ui:composition>
